<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jchome.jsprun.com/jch" prefix="jch"%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="cn.jcenterhome.util.CommonGetData" %>
<style>
#mainContent { background:url(bg.gif) right 0 repeat-y; overflow:auto;zoom:1; margin-bottom:5px;}
#sidebar { float:right; width:250px;}
#content { float:left; width:550px; margin: 0 0 0 0;}
</style>
<div class="space_list" id="mainContent">
<div id="content">
<c:choose>
 <c:when test="${empty list}"><div class="c_form">没有相关成员。</div></c:when>
 <c:otherwise>
 <table width="100%" height="25%">
  <c:forEach items="${list}" var="value" varStatus="key">

<c:if test="${key.count%2==1}">
<tr>
</c:if> 
<td> <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
     <td width="65"><div ><a href="space.jsp?uid=${value.uid}">${jch:avatar2(value.uid,"middle",false,sGlobal,sConfig)}</a></div></td>
     <td>
      <h2>
       <c:if test="${!jch:jchEmpty(ols[value.uid])}"><img src="image/online_icon.gif" align="absmiddle"></c:if>
       <a href="space.jsp?uid=${value.uid}" title="${sNames[value.uid]}"${value.gColor}>${sNames[value.uid]}</a>
      <c:if test="${not empty value.name && sNames[value.uid]!=value.name}"><span class="gray">(${value.name})</span></c:if>
       ${value.gIcon}
       <c:if test="${value.videostatus>0}"><img src="image/videophoto.gif" align="absmiddle"></c:if>
      </h2>
      地区：${value.resideprovince}省${value.residecity}市
       <ul class="line_list">
       <li><img src="image/icon/pm.gif"><a href="cp.jsp?ac=pm&uid=${value.uid}" id="a_pm_${key.index}" onclick="ajaxmenu(event, this.id, 1)" title="发消息">发送消息</a></li>
       <li><img src="image/icon/poke.gif"><a href="cp.jsp?ac=poke&op=send&uid=${value.uid}" id="a_poke_${key.index}" onclick="ajaxmenu(event, this.id, 1)" title="打招呼">打个招呼</a></li>
       <c:if test="${!value.isfriend}"><li><img src="image/icon/friend.gif"><a href="cp.jsp?ac=friend&op=add&uid=${value.uid}" id="a_friend_${key.index}" onclick="ajaxmenu(event, this.id, 1)" title="加好友">加为好友</a></li></c:if>
      </ul>
     </td>

    </tr>
   </table>
   </td>
<c:if test="${key.count%2==0}">
</tr>
</c:if>
<c:set var ="v_count" value="${key.count}"/>
</c:forEach>
<c:if test="${v_count%2==1}">
<td></td>
</tr>
</c:if>
  </table>
  <div class="page">${multi}</div>
 </c:otherwise>
</c:choose>
</div>
<%
     List list =CommonGetData.getRecommend();
     request.setAttribute("userlist",list);
%>

<div class="sidebox" id="sidebar">
    <div class="sidebox">
		<h2 class="title">
		推荐女会员
		</h2>
		<ul class="avatar_list">
			<c:forEach items="${userlist}"  var="value">
                <c:if test="${value.sex==2}">
                <li>
                    <div class="avatar48"><a href="space.jsp?uid=${value.uid}">${jch:avatar1(value.uid,sGlobal, sConfig)}</a></div>
                    <p><a href="space.jsp?uid=${value.uid }" title="${value.username }">${value.username}</a></p>
                    <p class="gray"><c:if test="${value.groupid==3}">vip用户</c:if><c:if test="${value.groupid!=3}">普通用户</c:if></p>
                </li>
                </c:if>
			</c:forEach>
		</ul>
    </div>
    <div class="sidebox">
        <h2 class="title">
            推荐男会员
        </h2>
        <ul class="avatar_list">
            <c:forEach items="${userlist}"  var="value">
                <c:if test="${value.sex==1}">
                    <li>
                        <div class="avatar48"><a href="space.jsp?uid=${value.uid}">${jch:avatar1(value.uid,sGlobal, sConfig)}</a></div>
                        <p><a href="space.jsp?uid=${value.uid }" title="${value.username }">${value.username}</a></p>
                        <p class="gray"><c:if test="${value.groupid==3}">vip用户</c:if><c:if test="${value.groupid!=3}">普通用户</c:if></p>
                    </li>
                </c:if>
            </c:forEach>
        </ul>
    </div>
</div>
</div>

